package com.itheima.clientAndService01;

public class ObjectClass01 {
    public static void main(String[] args) {
        Student stu1 = new Student("张三",23);
        Student stu2 = new Student("张四",23);
        Student stu3 = new Student("张三",23);

        //重写了toString方法
        System.out.println(stu2);
        System.out.println(stu2.toString());

        //重写了equals方法
        System.out.println(stu1.equals(stu3));
        System.out.println(stu2.equals(stu3));
    }
}
